import {
    DrawerForm,
    ProFormInstance,
} from '@ant-design/pro-components';
import { Button, Cascader, Descriptions, Space, Spin, message } from 'antd';
import { useRef, useState } from 'react';
interface DetailReportsProps {
    detail: InterviewRecordData.reportDetail
}
const DetailReports: React.FC<DetailReportsProps> = ({ detail }) => {
    const formRef = useRef<ProFormInstance>();
    const [modalFormOpen, setModalFormOpenState] = useState<boolean>(false);



    return (
        <>
            <DrawerForm
                trigger={<a>{detail.title}</a>}
                title="报道详情"
                formRef={formRef}
                autoFocusFirstInput
                drawerProps={{
                    maskClosable: true,
                    destroyOnClose: true,
                    width: '25%',
                }}
                visible={modalFormOpen}
                onVisibleChange={setModalFormOpenState}
                submitTimeout={2000}
                submitter={false}
            >
                <Spin
                    style={{
                        textAlign: 'center',
                    }}
                    spinning={detail === undefined}
                >
                    {/* <Descriptions>
                        <Descriptions.Item label="报道主题">{detail?.replyAccountName}</Descriptions.Item>
                    </Descriptions>
                    <Descriptions>
                        <Descriptions.Item label="认领时间">{detail?.claimTime}</Descriptions.Item>
                    </Descriptions>
                    <Descriptions>
                        <Descriptions.Item label="联络人">{detail?.contactName}</Descriptions.Item>
                    </Descriptions>
                    <Descriptions>
                        <Descriptions.Item label="联络人电话">{detail?.contactPhone}</Descriptions.Item>
                    </Descriptions>
                    <Descriptions>
                        <Descriptions.Item label="备注">{detail?.replyContent}</Descriptions.Item>
                    </Descriptions>
 */}

                </Spin>
            </DrawerForm >
        </>
    );
};

export default DetailReports;